<div class="fm-content">
  <!-- 最上面标题栏 -->
  <div class="title">
    <i nz-icon [type]="'desktop'"></i>
    &nbsp;&nbsp;同步日志
  </div>
  <!-- 内容 -->
  <div class="clwork">

    <!-- 查询框 -->
    <div class="top">
      <nz-select [(ngModel)]="fs.queryObject['state']" class="fm-input first-input"
        (nzOpenChange)="synStateDic.load('0')" [nzPlaceHolder]="'同步状态'">
        <nz-option *ngFor="let option of synStateDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
        </nz-option>
        <nz-option *ngIf="synStateDic.isLoading" nzDisabled nzCustomContent>
          <i nz-icon type="loading" class="loading-icon"></i>加载中...
        </nz-option>
      </nz-select>
      <input nz-input placeholder="同步人" class="fm-input" [(ngModel)]="fs.queryObject['synUserName:like']" />
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
    </div>

    <!--左侧栏合同列表信息-->
    <div class="left top-left">
      <nz-tree nzAsyncData (nzClick)="fs.loadDataEx($event.node.key)"
        [nzData]="proDic.treeDatas">
      </nz-tree>
    </div>

    <!-- 右则样表单主体 -->
    <div class="right top-right">
      <div class="table">
        <nz-table nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead (nzSortChange)="fs.sort($event)" nzSingleSort>
            <tr>
              <th nzWidth="80px" nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)"></th>
              <th nzWidth="300px">基本信息</th>
              <th nzWidth="80px">状态</th>
              <th>详情</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of fs.datas">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td>
                {{data.synUserName}} <br />
                {{data.synDate | date:'yyyy-MM-dd HH:mm:ss' }} <br />
                {{data.synTypeName}}
              </td>
              <td>{{data.stateName}}</td>
              <td>{{data.report}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</div>
